home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC-SIG: World of Education
/
PC-SiG's World of Education.iso
/
run
/
2602
/
fitline.hlp
< prev
next >
Wrap
Text File
|
1989-02-03
|
2KB
|
30 lines
FITLINE(idexpr, expr); Linear least squares fit to 'expr'
FITLINE performs a linear least squares fit to the 'expr' values. The
results of the fit are stored in the constants SLOPE(idexpr) and
OFFSET(idexpr) so that the equation of the resulting line is given by:
line equation = SLOPE(idexpr) * x + OFFSET(idexpr)
Up to 10 fitted lines may be active at one time with the 'idexpr' value
used to distinguish between them; hence 'idexpr' must be an integer
value from 0 to 9. If multiple FITLINE calls are made with the same
'idexpr' value then the SLOPE and OFFSET values will be overwritten and
will contain the values determined for the most recent fit. Thus, the
number of FITLINE calls is not limited, but the number of
simultaneously distinguishable fits is limited to 10.
+
The line is fit to the data in the current processing interval defined
by START, BIAS, STEP, and DUR. DAN attempts to fit a line to a
continuous function, and the number of points used in the process is
determined by STEP and DUR. DAN will 'manufacture' data points by
linearly interpolating to the current step time when the step time lies
between actual time tags in a data file. Data points are not
manufactured when the READ function is used to input a data file.
After a fit has been done, the processing interval may be modified
(e.g. change DUR) to obtain extrapolated values. Residuals may be
obtained by subtracting the original data from the line equation; e.g.
residuals = SLOPE(1)*T + OFFSET(1) - original_data_expr;